06. Input Handling Quiz

Input Handling Quiz

QUESTION:

Time to test yourself! When do the functions GetPress, GetPressUp, and GetPressDown return true?

ANSWER:

GetPress detects whether or not the button is currently held down. If the button is held down, it will return true, otherwise it returns false.

GetPressUp returns true on the frame the button’s state switched from pressed to not-pressed.

GetPressDown returns true on the frame the button’s state switched from not-pressed to pressed.

These are all useful states for detecting user input.